<?php
namespace app\common\model;

class Goods extends Base
{
	public static $size_sets = [
		1	=>	'0,1,2,3,4,5,6,7',
		2	=>	'38,39,40,41,42,43',
		3	=>	'24,25,26,27,28,29,30,31,32,33,34,36,38,40',
		4	=>	'XXS,XS,S,M,L,XL,XXL,XXXL,4XL,5XL',
		5	=>	'44,46,48,50,52,54,56',
		6	=>	'34,35,36,37,38,39,40,41,42,43,44,45,46',
		7	=>	'小,中,大,均',
		8	=>  '5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22',
		9	=>  '90,100,110,120,130,140,150,160',
	];
	public static $dangkou = ['东莞A','东莞B','东莞C'];

	public function cateInfo()
	{
		return $this->belongsTo('GoodsCategories','cate_id');
	}
	public function brandInfo()
	{
		return $this->belongsTo('GoodsBrand','brand_id');
	}
	public function acctInfo()
	{
		return $this->belongsTo('Account','acct_id');
	}
	public function items()
	{
		return $this->hasMany('OrdersItem','goods_id');
	}
	//商品属性关联
    public function room(){
        return $this->hasOne('Room','goods','id');
    }
}